//
//  MainView.swift
//  Weather Demo
//
//  Created by 葛鹏 on 2021/8/12.
//

import SwiftUI

struct MainView: View {
    @State var aqi: CGFloat = 1
    
    var times: [String] = [
        "现在","17时","18时","19时","20时","21时","22时","23时","00时","01时","02时","03时","04时","05时","06时","07时","08时","09时","10时","11时","12时","13时","14时","15时","16时"
    ]
    
    var weathers: [Image] = [
        Image(systemName: "sun.min.fill"),
        Image(systemName: "moon.fill"),
        Image(systemName: "cloud.bolt.rain.fill")
    ]
    
    var weeks = [
        "星期五","星期六","星期日","星期一","星期二","星期三","星期四","星期五","星期六"
    ]
    
    var body: some View {
        
       
        HStack{
            Text("AQI").font(.caption2)
            Text("93")
            ZStack{
                LinearGradient(gradient: Gradient(colors: [Color.green, Color.yellow, Color.white]), startPoint: .leading, endPoint: .trailing).frame(height: 10).cornerRadius(25)
                RoundedRectangle(cornerRadius: 50).stroke(lineWidth: 1.75).fill().frame(width: 10, height: 10).foregroundColor(.black).shadow(color: .white, radius: 1, x: 0.0, y: 0.0)
            }
            Text("良")
        }.padding()
        
        Divider().background(Color.white)
        
        
    }
}

struct MainView_Previews: PreviewProvider {
    static var previews: some View {
        MainView()
    }
}
